home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_1 / atcpsd40.lha / AmiTCP-4.0-gcc / netinclude / devices / netinfo.h next >
C/C++ Source or Header  |  1995-04-07  |  2KB  |  85 lines

  1. #ifndef DEVICES_NETINFO_H
  2. #define DEVICES_NETINFO_H \
  3.        "$Id$"
  4. /*
  5.  *    AmiTCP/IP netinfo.device interface for 32 bit C compilers
  6.  *
  7.  *      Copyright ⌐ 1994 AmiTCP/IP Group,
  8.  *                       Network Solutions Development, Inc.
  9.  *                       All rights reserved.
  10.  */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif
  15. #ifndef EXEC_IO_H
  16. #include <exec/io.h>
  17. #endif
  18.  
  19. #define NETINFONAME "AmiTCP:devs/netinfo.device"
  20.  
  21. /*
  22.  * Modified IOStdReq
  23.  */
  24. struct NetInfoReq {
  25.     struct  Message  io_Message;
  26.     struct  Device  *io_Device;     /* device node pointer  */
  27.     struct  Unit    *io_Unit;        /* unit (driver private) */
  28.     UWORD   io_Command;            /* device command */
  29.     UBYTE   io_Flags;
  30.     BYTE    io_Error;            /* error or warning num */
  31.     ULONG   io_Actual;            /* actual number of bytes transferred */
  32.     ULONG   io_Length;            /* requested number bytes transferred*/
  33.     APTR    io_Data;            /* points to data area */
  34.     ULONG   io_Offset;            /* search criteria */
  35. };
  36.  
  37. /*
  38.  * NetInfo units
  39.  */
  40. #define NETINFO_PASSWD_UNIT    0L
  41. #define NETINFO_GROUP_UNIT     1L
  42. #define NETINFO_UNITS          2L
  43.  
  44. /* 
  45.  * Non-standard commands
  46.  */
  47. #define NI_GETBYID    (CMD_NONSTD+0)
  48. #define NI_GETBYNAME  (CMD_NONSTD+1)
  49. #define NI_MEMBERS    (CMD_NONSTD+2)
  50. #define NI_END        (CMD_NONSTD+3)
  51.  
  52. /*
  53.  * Non-standard error codes (same as in the BSD errno)
  54.  */
  55. #define NIERR_NOTFOUND      2
  56. #define NIERR_TOOSMALL      7
  57. #define NIERR_NOMEM         12
  58. #define NIERR_ACCESS        13
  59. #define NIERR_NULL_POINTER  14
  60. #define NIERR_INVAL         22
  61.  
  62. /* The passwd structure */
  63. struct NetInfoPasswd
  64. {
  65.   UBYTE *pw_name;               /* Username */
  66.   UBYTE *pw_passwd;             /* Encrypted password */
  67.   LONG   pw_uid;                /* User ID */
  68.   LONG   pw_gid;                /* Group ID */
  69.   UBYTE *pw_gecos;              /* Real name etc */
  70.   UBYTE *pw_dir;                /* Home directory */
  71.   UBYTE *pw_shell;              /* Shell */
  72. };
  73.  
  74. /* The group structure */
  75. struct NetInfoGroup
  76. {
  77.   UBYTE  *gr_name;              /* Group name.  */
  78.   UBYTE  *gr_passwd;            /* Password.    */
  79.   LONG    gr_gid;        /* Group ID.    */
  80.   UBYTE **gr_mem;               /* Member list. */
  81. };
  82.  
  83. #endif /* DEVICES_NETINFO_H */
  84.  
  85.